Match only named lists in list grammar - #2784
Draft
datduyng wants to merge 7 commits into
Draft
Conversation
Collaborator
|
Looking at this I think a better approach is to just remove the grammar rule that's causing the problem. If I say: "create a ingedients list and a shopping list" and then "add cheese to both" that should work. The agent shouldn't know or care about any grammar or caching. In fact, it should work regardless of language. A user should be able to create a list called "my"... or, my could refer to a list of the useres name but that should get resolved in translation and not in the agent. |
datduyng
marked this pull request as draft
August 3, 2026 03:56
- Drop over-broad listSchema.agr rules that captured bare references
("the list", "my list", "both") as listName
- Keep named forms only ("the grocery list", "my shopping list") so
translation resolves references from history or clarifies
- Remove skipGrammar stopgaps for those list phrases; update schema-tuning
note #5
No agent-side placeholder rejection: list names like "my" stay valid;
reference resolution belongs in translation.
datduyng
force-pushed
the
domnguyen/list-placeholder-reject
branch
from
August 3, 2026 04:10
ef8841a to
56bb445
Compare
Keep the list grammar fix; leave the guide note as on main.
- Keep bare/ambiguous refs unmatched so translation owns them (Robert) - Add (can you)? on two-item adds; require everything|all items for clear - Order ClearList before RemoveItems to avoid item="everything" steal - Unit-test match/no-match matrix including create listName "my"
Follow Robert's guidance: remove over-broad grammar that captures bare references; do not teach the list agent about placeholders. - Named forms only: the|my + name + list (incl. can you two-item adds) - Bare/ambiguous refs unmatched → translation (LLM + history) - ClearList before RemoveItems; require everything|all items for clear - Grammar contract unit tests; action-grammar test devDependency
# Conflicts: # ts/pnpm-lock.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses review feedback (Robert): fix bare-reference capture by removing over-broad list grammar rules, not by teaching the list agent about placeholders/caching.
Grammar matches (named lists only)
add milk to the grocery list/add milk to my shopping listcan you add milk and eggs to the grocery listput cheese on the grocery list, remove/get/clear with the same named shapeGrammar does not match → translation (LLM + history)
add ham to the list,put cheese on the list,add cheese to both,add ham to my listadd milk to grocery list(avoids reopeninglistName="the"viato $(listName) list)Agent
create my liststays valid.Tests
listSchema.grammar.spec.tsskipGrammarstopgaps on the two bare-list e2e phrasesTest plan
@typeagent/list-agentunit tests (23 passing)